package com.cwvs.services;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cwvs.dao.AppDepartmentDao;
import com.cwvs.utils.Pages;

/**
 * 科室与专家SERVICE
 * 
 */
@Service
public class AppDepartmentService {

	@Resource
	private AppDepartmentDao appDepartmentDao;

	/**
	 * 科室列表
	 * 
	 * @return
	 */
	public List<Map<String, Object>> departmentList(String store_id) {
		return appDepartmentDao.departmentList(store_id);
	}
	/**
	 * 专家列表
	 * 
	 * @return
	 */
	public List<Map<String, Object>> personList(String department_id) {
		return appDepartmentDao.personList(department_id);
	}
	/**
	 * 通过ID获取科室信息
	 */
	public Map<String,Object> getDepartmentInfo(String id){
		return appDepartmentDao.getDepartmentInfo(id);
	}
	
	/**
	 * 通过ID获取专家信息
	 */
	public Map<String,Object> getPersonInfo(String id){
		return appDepartmentDao.getPersonInfo(id);
	}
	/**
	 * 科室列表
	 * 
	 * @return
	 */
	public Pages departmentList(Map<String, Object> m, Pages page) {
		return appDepartmentDao.departmentList(m, page);
	}
	
	/**
	 * 保存或者修改科室
	 */
	public boolean saveOrUpdate(Map<String, Object> o) {
		return appDepartmentDao.saveOrUpdate(o);
	}
	
	/**
	 * 状态更新
	 * @param id
	 * @return
	 */
	public boolean departmentSetStaus(String id,boolean status){
		return appDepartmentDao.departmentSetStaus(id, status);
	}

}
